//
//  SHKDotTable.m
//  EagleCloud
//
//  Created by Cer on 2019/8/2.
//
//

#import "YsNoteSDKNoteListRealmModel.h"

@implementation YsNoteSDKNoteListRealmModel
    
+ (NSString *)primaryKey{
    return @"noteID";
}

//返回一个 Dict，将 Model 属性名对映射到 JSON 的 Key。
+ (NSDictionary *)modelCustomPropertyMapper {
    return @{@"noteID" : @"note_fkcode",
             @"noteName" : @"note_title",
             @"createTime" : @"create_time",
             @"updateTime" : @"update_time",
             @"bookCode" : @"book_fkcode",
             @"ys_uuid" : @"data_url"
             };
}

- (instancetype)initWithNoteID:(NSString *)noteID
                  withSyncFlag:(BOOL)syncFlag
                  withNoteName:(NSString *)noteName
                withCreateTime:(NSString *)createTime
                withUpdateTime:(NSString *)updateTime
                    withBookID:(NSString *)bookID
                  withBookCode:(NSString *)bookCode
                 withBook_type:(NSString *)book_type
                      withUuid:(NSString *)ys_uuid
            withLocalImagePath:(NSString *)localImagePath
              withLocalZipPath:(NSString *)localZipPath
                 withnote_type:(NSString *)note_type
                withimages:(NSString *)images
{
    if (self = [self init]) {
        self.noteID = noteID;
        if (syncFlag) {
            self.syncFlag = @"1";
        }else{
            self.syncFlag = nil;
        }
        self.noteName = noteName;
        self.createTime = createTime;
        self.updateTime = updateTime;
        self.bookCode = bookCode;
        self.book_type = book_type;
        self.ys_uuid = ys_uuid;
        self.localImagePath = localImagePath;
        self.localZipPath = localZipPath;
        self.note_type = note_type;
        self.userID = @"123213";
        self.images = images;
    }
    return self;
}

@end
